package com.ecoolex.hotel.saas.enums;

import com.ecoolex.framework.common.EnumInterface;
import com.ecoolex.framework.common.util.Check;

public enum PresaleCouponOrderPaymentType implements EnumInterface<PresaleCouponOrderPaymentType, Integer> {
        WECHAT_PAY(1, "微信支付"),
        OFFLINE_PAY(2, "线下支付");

        private int real;

        private String describe;

	private PresaleCouponOrderPaymentType(int real, String describe) {
        this.real = real;
        this.describe = describe;
    }

        @Override
        public Integer real() {
        return real;
    }

        @Override
        public String describe() {
        return describe;
    }

        @Override
        public PresaleCouponOrderPaymentType realOf(Integer real) {
        if (Check.notNull(real)) {
            for (PresaleCouponOrderPaymentType v : values()) {
                if (v.real().equals(real)) {
                    return v;
                }
            }
        }
        return null;
    }
}
